<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f"%><!-- 格式话日期 -->
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>统计系统</title>
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/css/index1.css" type="text/css"></link>
<style type="text/css">
body {
	font-size: 12px;
	background-image: url(images/bg.gif);
	background-repeat: repeat;
}
</style>
</head>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/js/jquery-1.8.2.min.js"></script>
<link href="<%=request.getContextPath()%>/css/bootstrap.min.css"
	rel="stylesheet">
<script src="<%=request.getContextPath()%>/js/bootstrap.min.js"></script>
<script type="text/javascript">
	/* function search(){
		var name=$("[name='name']").val();
		location.href="list?name="+name;
	} */
	$(function (){
		$("#make").click(function (){
			location.href="<%=request.getContextPath()%>/getTable";
			<%-- $.post(
				"<%=request.getContextPath() %>/getTable",
				{
				},
				function (data){
				},
				"json"
			); --%>
		})
		
		$("#date").blur(function (){
			var date = $(this).val();
			$("[name=time]").val(date);
		})
		/* $(".0").addClass("active");
		$(".1").addClass("success");
		$(".2").addClass("warning");
		$(".3").addClass("danger");
		$(".4").addClass("info"); */
	})
	
</script>
<body>
	<div>
		<em style="color: red">${teacher.name}</em> 老师
		<c:if test="${classes.size() > 1}">

			<form action="<%=request.getContextPath()%>/list" method="post">
				<font color="red">您的班级过多，请先选择</font> <input type="hidden"
					name="time" value="${time }" /> <select name="t_cid">
					<c:forEach items="${classes }" var="c">
						<option value="${c.id }">${c.name }</option>
					</c:forEach>
				</select>
				<button class="btn btn-info" id="ok">确定</button>
			</form>
			<!-- 选择目录<input type="file" name="position"/> -->
			<button class="btn btn-success" id="make">生成报表</button>
			<!-- <input class="btn btn-info" type="button" id="make" value="生成报表"> -->
		</c:if>
		<p align="right">
			选择日期<input type="text" id="date" value="${time }" name="date"
				onclick="WdatePicker()" readonly="readonly" />
		</p>
	</div>
	<br>
	<center>
		<form class="form-inline" 
			action="<%=request.getContextPath()%>/list" method="post">
			<input type="hidden" name="time" value="${time }" /> 
			<div class="form-group has-success">
				<label for="search" class="col-sm-7 control-label">搜全系，搜班级</label>
				<div class="col-sm-5">
					<select name="cid" >
						<option value="0">请选择</option>
						<c:forEach items="${classList }" var="cc">
							<option value="${cc.id }">${cc.name }</option>
						</c:forEach>
					</select>
			
				</div>
			</div>
			<div class="form-group">
				<label for="name" class="col-sm-4 control-label">搜讲师</label>
				<div class="col-sm-8">
					<input type="text" name="tname" value="${tname }" 
					id="tname"	placeholder="请输入讲师名" />
				</div>
			</div><%-- <input type="text" value="${tname }" name="tname" /> --%>
			<div class="form-group">
				<label for="name" class="col-sm-4 control-label">搜学生</label>
				<div class="col-sm-8">
					<input type="text" name="sname" value="${sname }"
					id="sname"	placeholder="请输入学生名" />
				</div>
			</div> 
			  <%-- <input
				type="text" value="${sname }" name="sname" /> --%>
			<!-- <input type="submit" class="btn btn-info" value="搜索" /> -->
			<button class="btn btn-warning">搜索</button>
		</form>
	</center>
	<center>
		<c:if test="${!empty stuList}">
			<table class="table table-responsive table-bordered table-hover">

				<tr class="danger">
					<td>编号</td>
					<td>项目经理</td>
					<td>学生姓名</td>
					<td>所在班级</td>
					<td>就业状态</td>
					<td>联系状态</td>
					<td>当日时间</td>
					<td>公司</td>
					<td>面试状态</td>
					<td>录音资料</td>
					<td>毕业前指导</td>
					<td>毕业后指导</td>
					<td>录音诊断</td>
					<td>今日是否联系</td>
					<td>面试时间</td>

				</tr>

				<c:forEach items="${stuList}" var="s" varStatus="co">
				<c:if test="${co.index % 2 == 0}">
					<tr class="success">
						<td>${s.sid}</td>
						<td>${s.tname }</td>
						<td>${s.sname}</td>
						<td>${s.cname }</td>
						<td><c:if test="${s.jobStatus==1 }">
					就业
				</c:if> <c:if test="${s.jobStatus==2 }">
					未就业
				</c:if> <c:if test="${s.jobStatus==3 }">
					辞职
				</c:if></td>
						<td><c:if test="${s.callStatus==1 }">
					正常
				</c:if> <c:if test="${s.callStatus==2 }">
					失联
				</c:if></td>
						<td>
							<%-- ${s.presentDate } --%> <f:formatDate
								value="${s.presentDate }" pattern="yyyy-MM-dd" />
						</td>
						<td>${s.company }</td>
						<td><c:if test="${s.msflag==1 }">
					有
				</c:if> <c:if test="${s.msflag==2 }">
					无
				</c:if></td>
						<td><c:if test="${s.soundflag==1 }">
					有
				</c:if> <c:if test="${s.soundflag==2 }">
					无
				</c:if></td>
						<td><c:if test="${s.firstguideflag==1 }">
					有
				</c:if> <c:if test="${s.firstguideflag==2 }">
					无
				</c:if></td>
						<td><c:if test="${s.laterguideflag==1 }">
					有
				</c:if> <c:if test="${s.laterguideflag==2 }">
					无
				</c:if></td>
						<td><c:if test="${s.diagnoseflag==1 }">
					以听
				</c:if> <c:if test="${s.diagnoseflag==2 }">
					未听
				</c:if></td>
						<td><c:if test="${s.relationflag==1 }">
					联络
				</c:if> <c:if test="${s.relationflag==2 }">
					未联络
				</c:if></td>
						<td>${s.mstime}</td>
						<td><a
							href="<%=request.getContextPath()%>/interview?id=${s.sid}">添加</a>
						</td>
					</tr>
				</c:if>
				<c:if test="${co.index % 2 == 1}">
					<tr class="warning">
						<td>${s.sid}</td>
						<td>${s.tname }</td>
						<td>${s.sname}</td>
						<td>${s.cname }</td>
						<td><c:if test="${s.jobStatus==1 }">
					就业
				</c:if> <c:if test="${s.jobStatus==2 }">
					未就业
				</c:if> <c:if test="${s.jobStatus==3 }">
					辞职
				</c:if></td>
						<td><c:if test="${s.callStatus==1 }">
					正常
				</c:if> <c:if test="${s.callStatus==2 }">
					失联
				</c:if></td>
						<td>
							<%-- ${s.presentDate } --%> <f:formatDate
								value="${s.presentDate }" pattern="yyyy-MM-dd" />
						</td>
						<td>${s.company }</td>
						<td><c:if test="${s.msflag==1 }">
					有
				</c:if> <c:if test="${s.msflag==2 }">
					无
				</c:if></td>
						<td><c:if test="${s.soundflag==1 }">
					有
				</c:if> <c:if test="${s.soundflag==2 }">
					无
				</c:if></td>
						<td><c:if test="${s.firstguideflag==1 }">
					有
				</c:if> <c:if test="${s.firstguideflag==2 }">
					无
				</c:if></td>
						<td><c:if test="${s.laterguideflag==1 }">
					有
				</c:if> <c:if test="${s.laterguideflag==2 }">
					无
				</c:if></td>
						<td><c:if test="${s.diagnoseflag==1 }">
					以听
				</c:if> <c:if test="${s.diagnoseflag==2 }">
					未听
				</c:if></td>
						<td><c:if test="${s.relationflag==1 }">
					联络
				</c:if> <c:if test="${s.relationflag==2 }">
					未联络
				</c:if></td>
						<td>${s.mstime}</td>
						<td><a
							href="<%=request.getContextPath()%>/interview?id=${s.sid}">添加</a>
						</td>
					</tr>
				</c:if>	
				</c:forEach>
			</table>
		</c:if>

	</center>
</body>
</html>